-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various table fixes #1833
Various table fixes #1833
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self review
&.text-left { | ||
text-align: left; | ||
} | ||
|
||
&.text-align\:right { | ||
&.text-right { | ||
text-align: right; | ||
} | ||
|
||
&.text-align\:center { | ||
&.text-center { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These classes were changed in executablebooks/MyST-Parser#450
display: table; | ||
overflow: auto; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of flip-flop history here:
- In force table to fit in the article width #717,
display: block
andoverflow: auto
rules are applied to all table elements, which previously were restricted to tables within section elements - In Fix several CSS elements and bugs for Sphinx 5 #818,
display: block
was changed todisplay: table
As I discuss in issue #1824, it's probably a bad idea to change the display property of a table element since that might strip it of its semantics. And there's no need to explicitly put display: table
on the table element, because that's what browsers assume.
As for the overflow rule, it only made sense when the table had display: block
, as I discuss in PR #1827.
So to reduce head-scratching for future devs, I'm removing both rules.
Why a so old version of MyST?
Thanks! |
I think what was meant are "this changes has been introduced in myst 0.16 in 2021, so are not recent, therefore safe", not "we want to align to an old version of myst". |
Correct. That's my justification for not leaving a backwards-compatibility layer. |
This PR makes a few changes to the _tables.scss file: - Matches our table alignment classes with an [update to MyST from 2021](executablebooks/MyST-Parser#450) (version [0.16.0](https://github.com/executablebooks/MyST-Parser/releases/tag/v0.16.0)) - Removes the redundant and useless `display: table` and `overflow: auto` rules - Updates a comment Fixes pydata#1804.
This PR makes a few changes to the _tables.scss file:
display: table
andoverflow: auto
rulesFixes #1804.